//
//  SEProfileOtherCell.swift
//  SmartEyeForPatient
//
//  Created by qdsg on 2021/4/13.
//

import UIKit

enum SEProfileOtherCellTapType {
    case registration
    case attention
    case patient
    case help
}

protocol SEProfileOtherCellDelegate: NSObjectProtocol {
    func profileOtherCellTapAction(type: SEProfileOtherCellTapType)
}

class SEProfileOtherCell: UITableViewCell {

    static let className = "SEProfileOtherCell"
    static let reuseId = className

    weak var delegate: SEProfileOtherCellDelegate?

    @IBOutlet weak var bgView: UIView! {
        didSet {
            bgView.setLayerCorners(rect: bgView.bounds, radius: 14)
            bgView.setShadow()
        }
    }

    @IBAction func registrationBtnAction(_ sender: UIButton) {
        delegate?.profileOtherCellTapAction(type: .registration)
    }

    @IBAction func attentionBtnAction(_ sender: Any) {
        delegate?.profileOtherCellTapAction(type: .attention)
    }

    @IBAction func patientBtnAction(_ sender: Any) { delegate?.profileOtherCellTapAction(type: .patient)
    }

    @IBAction func helpBtnAction(_ sender: Any) {
        delegate?.profileOtherCellTapAction(type: .help)
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
